package zut.cs.liziflower.mapper;

import org.apache.ibatis.annotations.Param;
import zut.cs.liziflower.entity.Comments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xuwenke
 * @since 2022-05-19
 */
public interface CommentsMapper extends BaseMapper<Comments> {
    List<Comments> getCommentByUserIdAndFlowerId(@Param("userid") Integer userid,@Param("flowerid") Integer flowerid);

    //获取某种花的全部评论
    List<Comments> getComment(@Param("flowerid") Integer flowerid);

    int addRemark(@Param("userid") Integer userid, @Param("flowerid") Integer flowerid, @Param("remark") String remark);
}
